<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/jsp/taglibs.jsp"%>
<%@taglib uri="http://www.framework.com/taglib" prefix="frame"%>
  <head>
	<title>公共平台 </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- 样式文件的引入 -->
	<link href="${ctx}/commons/css/style.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="${ctx}/commons/themes/icon.css">
	<!-- jqueryUI JS文件的引入 -->
	<script type="text/javascript" src="${ctx}/commons/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${ctx}/commons/js/easyui-extends-validate.js"></script>
	<!-- jqueryUI国际化 -->
	<script type="text/javascript" src="${ctx}/commons/js/easyui-lang-zh_CN.js"></script>
	<!-- 开发使用的公用js方法 -->
	<script type="text/javascript" src="${ctx}/commons/js/common.js"></script>
	<!-- 开发国际化的引用，主要完成后台信息在前台提示的国际化，一定要放在最后 -->
	<script type="text/javascript">var ctx = '${ctx}';var actionExt = "action";var i18n = new Object();</script>
	<script src="${ctx}/commons/js/i18n/message_zh_CN.js" type="text/javascript"></script>
  </head>
  
  <body>
    <div class="easyui-layout" data-options="fit:true,border:false" >
			<div data-options="region:'north',border:false" style="padding: 4px;height: 50px;overflow: hidden;">
			<div class="easyui-panel" data-options="fit:true,border:true" >
			<div  class="queryContent">
				<form name="searchProjectsForm" id="searchProjectsForm" method="post" action="" style="display: none; ">
				<table class="queryTable" >
					<tbody>
						<tr>
							<th>发生时间</th>
							<td>
								<input id="startTime" class="easyui-datebox" type="text" name="startTime"  maxlength="20" style="width:120px;height: 25px;" value="${startTime }"/>
								-<input id="stopTime" class="easyui-datebox" type="text" name="stopTime"  data-options="validType:['dateTimeMoreCompare[\'startTime\']']" maxlength="20" style="width:120px;height: 25px;" value="${stopTime }"/>
							</td>
							<td align="right" colspan="3">
								<a href="javascript:void(0);" class="easyui-linkbutton" id="searchDeposit" iconcls="icon-search" plain="true">查询</a>
								<a href="javascript:void(0);" class="easyui-linkbutton" id="resetsearchProjects" iconcls="icon-reset" plain="true">清空</a>
							</td>
						</tr>
					</tbody>
				</table>
				</form>
			</div>
			</div>
			</div>
		<div data-options="region:'center',border:false" style="padding: 4px;">
		    <table class="infoTable" style="margin: 30px auto;width: 80%;">
		     <tbody>
		        <tr>
					<td style="background-color: #EDF4FB;" align="center" width="50%" colspan="2">投标保证金（元）</td> 
					<td style="background-color: #EDF4FB;" align="center" width="50%" colspan="2">履约保证金（元）</td> 
				</tr>
				<tr>
					<td style="background-color: #EDF4FB;" align="center" width="25%">收入</td> 
					<td style="background-color: #EDF4FB;" align="center" width="25%">支出</td> 
					<td style="background-color: #EDF4FB;" align="center" width="25%">收入</td> 
					<td style="background-color: #EDF4FB;" align="center" width="25%">支出</td> 
				</tr>
				<tr>
					<td align="center" width="25%">
					 	<a href="#" onclick="getDepositDetails('0');">${ returnIncomeAmount}</a>
				    </td>
					<td align="center" width="25%">
					 	<a href="#" onclick="getDepositDetails('0','1');">${ returnPayAmount}</a>
				    </td>
					<td align="center" width="25%">
					 	<a href="#" onclick="getDepositDetails('1');">${ executeIncomeAmount}</a>
				    </td>
				    <td align="center" width="25%">
					 	<a href="#" onclick="getDepositDetails('1','1');">${ executePayAmount}</a>
				    </td>
			    </tr> 
			 </tbody>
		   </table>       
		</div>
	</div>
	<div id="bindPicDialog"></div>
	<div id="selPicDialog"></div>
	<div id="noCompetReasonDialog"></div>
</body>
	<script type="text/javascript">
		//初始化表格对应的js对象
		var projectsParamObj;
		$(function() {
			//初始化表格对象数据
			projectsParamObj = new initParams(
					{
						paramObjName : 'projectsParamObj',//表格对应的实体对象名称，好区分多个表格情况下的对象
						tableId:'listProjectsTable',
						addDataFormId:'addProjectsDataForm',
						showDialogId:'firstLevelDialog',
						searchID:'searchProjects',
						resetSearchID:'resetsearchProjects',
						searchFormID:'searchProjectsForm',
						updateUrl:"${ctx}/business/projectmanage/input?projectId=",
						deleteUrl:'${ctx}/business/projectmanage/remove',
						addDialogWidth:700,
						addDialogHeight:520,
						ctx:'${ctx}',
						addDialogTitle:'采购项目信息'
					});
			//初始化查询
			init(projectsParamObj);
			//setTimeout(function(){
				//$.parser.parse(".optionsAreas");
			//},1000);
		});
		
		$("#searchDeposit").click(function(){
			if($('#searchProjectsForm').form('validate')){
				var queryParam = $("#searchProjectsForm").serialize();
				$("form").attr("action","${ctx}/business/report/depositTime")
				$("form").submit();
			}
		});


		/**
		*保证金明细
		*/
		function getDepositDetails(depositType,status){
			var url="${ctx}/business/report/getDepositDetails?depositType="+depositType+"&startTime=${startTime}&stopTime=${stopTime}";
			if(status!=undefined){
				url+="&status="+status;
			}
			top.$('#firstLevelDialog').dialog({    
			    title:"保证金明细",  
			    iconCls:'icon-view',
			    width: 1000,    
			    height: 630,    
			    closed: false,    
			    inline : true,
			    cache: false,    
			    href: url,
			    modal: true,
				extractor : function(data){
					if($.trim(data) == "unLogin"){
						var msn = ''||i18n[''];
						msn = msn||i18n[data];
						if(msn != undefined){
							top.$.messager.alert('提示',msn,'info',function(){top.location='${ctx}/user-login-sys-new/loginPwd';});
							return '';
						}
					}
					return data;
				},
			    buttons : [{
						text:projectsParamObj.cancelButton,
						iconCls:'icon-cancel',
						handler:function(){
							top.$('#firstLevelDialog').dialog('close');
						}}]
			});
			top.$('#'+projectsParamObj.showDialogId).dialog("center");
		}
		

		
						
</script>